/*
 * String2.h
 *
 *  Created on: 2012-5-17
 *      Author: esf
 */

#ifndef STRING2_H_
#define STRING2_H_

#include "Comparable.h"
#include "Object.h"

namespace java_lang {

class String: public virtual java_lang::Comparable<String>,
		virtual public Object {
private:
	std::string string;
public:
	String() {
		this->string = "";
	}

	~String() {

	}

	String(const char * c) {
		this->string = c;
	}
	int compareTo(String& str);
	String& operator +(String& str);
	char charAt(int index);
	std::string toString();
	bool operator==(String &s) {
		return &(this->string) == &(s.string);
	}

};

} /* namespace collection */
#endif /* STRING2_H_ */
